<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
  export default {
    name: 'App',
    watch: {
      '$route' (to, from) {
        this.$store.commit('updateToggleValue', 'index')
      }
    },
    created () {
      document.onkeydown = function () {
        if (window.Event.keyCode === 8) {
          window.Event.keyCode = 0
          window.Event.returnValue = false
        }
      }
    }
  }
</script>
<style lang="stylus">
  html,body, #app
    height 100%
    background #f5f5f5
    overflow hidden
</style>
